#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int n, count = 0, a[100], b[100];
	double per;
	scanf("%d", &n);

	for (int i = 0; i < n; i++)
		scanf("%d", &a[i]);
	for (int i = 0; i < n; i++)
		scanf("%d", &b[i]);
	for (int i = 0; i < n; i++)
		if (a[i] == b[i])
			count++;

	per = count * 100.0 / n;
	printf("%.2lf%%", per);  //打印百分号用%%
	return 0;
}